本文整理了Java中org.mongodb.morphia.query.Query.iterator
方法的一些代码示例,展示了Query.iterator
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.iterator
方法的具体详情如下:
包路径:org.mongodb.morphia.query.Query
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!