当前位置: 首页>>代码示例>>Java>>正文


Java PreparedQuery.countEntities方法代码示例

本文整理汇总了Java中com.google.appengine.api.datastore.PreparedQuery.countEntities方法的典型用法代码示例。如果您正苦于以下问题:Java PreparedQuery.countEntities方法的具体用法?Java PreparedQuery.countEntities怎么用?Java PreparedQuery.countEntities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.appengine.api.datastore.PreparedQuery的用法示例。


在下文中一共展示了PreparedQuery.countEntities方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isInStore

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public boolean isInStore() {
    final DatastoreQuery query = getMatchingQuery();
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    final int count = preparedQuery.countEntities(fetchOptions);
    return (count > 0);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:9,代码来源:Model.java

示例2: countOptions

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countOptions(final PageId source) {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    final Filter filter = getSourceFilter(source);
    query.setFilter(filter);
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:10,代码来源:StoryOption.java

示例3: countAllPagesWrittenBy

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countAllPagesWrittenBy(final String authorId) {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    final Filter filter = getAuthorIdFilter(authorId);
    query.setFilter(filter);
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:10,代码来源:StoryPage.java

示例4: countAllPages

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countAllPages() {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:8,代码来源:StoryPage.java

示例5: countVersions

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countVersions(final int num) {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    final Filter filter = getIdNumFilter(num);
    query.setFilter(filter);
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:10,代码来源:StoryPage.java

示例6: countAllBeginnings

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countAllBeginnings() {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    query.setKeysOnly();
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:9,代码来源:StoryBeginning.java

示例7: countNewNotificationsForRecipient

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countNewNotificationsForRecipient(
        final String recipientId) {
    final DatastoreQuery query = new DatastoreQuery(KIND_NAME);
    final Filter recipientFilter = getRecipientFilter(recipientId);
    final boolean isNew = true;
    final Filter isNewFilter = getIsNewFilter(isNew);
    final Filter filter;
    filter = CompositeFilterOperator.and(recipientFilter, isNewFilter);
    query.setFilter(filter);
    final Store store = new Store();
    final PreparedQuery preparedQuery = store.prepare(query);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:15,代码来源:Notification.java

示例8: countFirstPagesMatchingTag

import com.google.appengine.api.datastore.PreparedQuery; //导入方法依赖的package包/类
public static int countFirstPagesMatchingTag(final String tag) {
    final PreparedQuery preparedQuery = getPreparedQueryForFirstPagesMatchingTag(
            tag);
    final FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
    return preparedQuery.countEntities(fetchOptions);
}
 
开发者ID:MattHeard,项目名称:Dendrite,代码行数:7,代码来源:StoryPage.java


注:本文中的com.google.appengine.api.datastore.PreparedQuery.countEntities方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。