org.mongodb.morphia.query.Query.iterator()方法的使用及代码示例

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

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

Query.iterator介绍

暂无

代码示例

代码示例来源:origin: org.actframework/act-morphia

@Override
public Iterator<MODEL_TYPE> iterator() {
  return mq.iterator();
}

代码示例来源:origin: BlackLabs/play-morphia

public <T extends Model> Iterator<T> iterator() {
  return (Iterator<T>) q_.iterator();
}

代码示例来源:origin: NationalSecurityAgency/lemongrenade

public HashMap<String, LGJob> getByJobIds(JSONArray jobIds) {
  Query<LGJob> query = createQuery().field("_id").hasAnyOf(jobIds);
  HashMap<String, LGJob> jobs = new HashMap<>();
  Iterator queryIterator = query.iterator();
  while(queryIterator.hasNext()) {
    LGJob job = (LGJob) queryIterator.next();
    String jobId = job.getJobId();
    jobs.put(jobId, job);
  }
  return jobs;
}

代码示例来源:origin: RentTheRunway/alchemy

@Override
public void invalidateAll(Experiment.BuilderFactory factory) {
  final Iterator<ExperimentEntity> iterator =
    ds
      .find(ExperimentEntity.class)
      .field("active").equal(true)
      .iterator();
  final Map<String, Experiment> newMap = Maps.newConcurrentMap();
  Long maxRevision = null;
  while (iterator.hasNext()) {
    final ExperimentEntity entity = iterator.next();
    if (maxRevision == null || entity.revision > maxRevision) {
      maxRevision = entity.revision;
    }
    newMap.put(entity.name, entity.toExperiment(factory.createBuilder(entity.name)));
  }
  if (maxRevision != null) {
    revisionManager.setLatestRevision(maxRevision);
  }
  cachedExperiments = newMap;
}

代码示例来源:origin: RentTheRunway/alchemy

return new ExperimentIterable(query.iterator(), factory);

相关文章