com.googlecode.objectify.cmd.Query.iterable()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.googlecode.objectify.cmd.Query.iterable方法的一些代码示例,展示了Query.iterable的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.iterable方法的具体详情如下:
包路径:com.googlecode.objectify.cmd.Query
类名称:Query
方法名:iterable

Query.iterable介绍

暂无

代码示例

代码示例来源:origin: bedatadriven/activityinfo

public static Iterable<CatalogEntry> queryReports(String parentId) {

    if(parentId.charAt(0) != CuidAdapter.DATABASE_DOMAIN) {
      return Collections.emptyList();
    }

    QueryResultIterable<AnalysisEntity> result = Hrd.ofy().load()
      .type(AnalysisEntity.class)
      .filter("parentId", parentId)
      .iterable();

    return Iterables.transform(result, new Function<AnalysisEntity, CatalogEntry>() {
      @Override
      public CatalogEntry apply(AnalysisEntity analysisEntity) {
        return new CatalogEntry(analysisEntity.getId(), analysisEntity.getLabel(), CatalogEntryType.ANALYSIS);
      }
    });
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public List<FormRecord> run() {
    QueryResultIterable<FormRecordEntity> query = ofy().load()
        .type(FormRecordEntity.class)
        .ancestor(FormEntity.key(formClass))
        .filter("parentRecordId", this.parentRecordId.asString())
        .iterable();

    List<FormRecord> records = Lists.newArrayList();
    for (FormRecordEntity entity : query) {
      records.add(entity.toFormRecord(formClass));

    }
    return records;
  }
}

代码示例来源:origin: bedatadriven/activityinfo

for (FormRecordSnapshotEntity snapshot : query.iterable()) {
  RecordVersion version = new RecordVersion();
  version.setRecordId(snapshot.getRecordId());

相关文章