@Test public void getCount_withNamespace_shouldReturnOneEntity() { createEntityInDatastore(KIND_NAME, PROPERTY_NAME, A_NAME); createEntityInNamespace(A_NAMESPACE, KIND_NAME, PROPERTY_NAME, ANOTHER_NAME); long entityCount = entitiesService.getCount(KIND_NAME, A_NAMESPACE); assertEquals(1L, entityCount); }
@Override public long getCount(String kind, String namespace) { AppEngineHelper.disableApiHooks(); return countProvider.get(kind, namespace); }
EntitiesServiceImpl implements EntitiesService { @Override public long getCount(String kind, String namespace) { AppEngineHelper.disableApiHooks(); return countProvider.get(kind, namespace); } }
EntitiesServiceImpl implements EntitiesService { @Override public long getCount(String kind, String namespace) { AppEngineHelper.disableApiHooks(); return countProvider.get(kind, namespace); } @Inject  EntitiesServiceImpl(
            DatastoreHelper datastoreHelper,
            DefaultValueGenerator defaultValueGenerator,
            DatastoreCountProvider countProvider); }
EntitiesServiceImpl implements EntitiesService { @Override public long getCount(String kind, String namespace) { AppEngineHelper.disableApiHooks(); return countProvider.get(kind, namespace); } @Inject  EntitiesServiceImpl(
            DatastoreHelper datastoreHelper,
            DefaultValueGenerator defaultValueGenerator,
            DatastoreCountProvider countProvider); @Override Iterable<Entity> getEntities(String kind, String namespace, Integer offset, Integer limit); @Override Collection<Entity> getEntities(List<Key> keys); @Override Entity createEmptyEntity(String kind); @Override void deleteEntities(String kind, String namespace, DeleteEntities deleteType, String encodedKeys); @Override long getCount(String kind, String namespace); @Override List<Key> put(Iterable<Entity> entities); @Override Future<List<Key>> putAsync(Iterable<Entity> entities); }
EntitiesServiceImpl implements EntitiesService { @Override public long getCount(String kind, String namespace) { AppEngineHelper.disableApiHooks(); return countProvider.get(kind, namespace); } @Inject  EntitiesServiceImpl(
            DatastoreHelper datastoreHelper,
            DefaultValueGenerator defaultValueGenerator,
            DatastoreCountProvider countProvider); @Override Iterable<Entity> getEntities(String kind, String namespace, Integer offset, Integer limit); @Override Collection<Entity> getEntities(List<Key> keys); @Override Entity createEmptyEntity(String kind); @Override void deleteEntities(String kind, String namespace, DeleteEntities deleteType, String encodedKeys); @Override long getCount(String kind, String namespace); @Override List<Key> put(Iterable<Entity> entities); @Override Future<List<Key>> putAsync(Iterable<Entity> entities);  }