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


Java ORecordIteratorClass类代码示例

本文整理汇总了Java中com.orientechnologies.orient.core.iterator.ORecordIteratorClass的典型用法代码示例。如果您正苦于以下问题:Java ORecordIteratorClass类的具体用法?Java ORecordIteratorClass怎么用?Java ORecordIteratorClass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ORecordIteratorClass类属于com.orientechnologies.orient.core.iterator包,在下文中一共展示了ORecordIteratorClass类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: browseClass

import com.orientechnologies.orient.core.iterator.ORecordIteratorClass; //导入依赖的package包/类
private void browseClass(final ODatabaseDocumentTx db, final Class<? extends DocumentObject> documentObject, final JsonObjectBuilder counts) {
    final String documentClassName = DocumentObject.documentClassName(documentObject);
    if (db.getMetadata().getSchema().getClass(documentClassName) == null) {
        counts.add(documentClassName, -1);
        return;
    }

    final ORecordIteratorClass<ODocument> it = db.browseClass(documentClassName);
    if (it.hasNext()) {
        it.next();
        counts.add(documentClassName, 1);
    } else {
        counts.add(documentClassName, 0);
    }
}
 
开发者ID:runrightfast,项目名称:runrightfast-vertx,代码行数:16,代码来源:ODatabaseDocumentTxHealthCheck.java

示例2: elements

import com.orientechnologies.orient.core.iterator.ORecordIteratorClass; //导入依赖的package包/类
protected <A extends Element> Iterator<A> elements(String elementClass, Function<ORecord, A> toA, Object... elementIds) {
    boolean polymorphic = true;
    if (elementIds.length == 0) {
        // return all vertices as stream
        Iterator<ORecord> itty = new ORecordIteratorClass<>(database, database, elementClass, polymorphic);
        return asStream(itty).map(toA).iterator();
    } else {
        Stream<ORID> ids = Stream.of(elementIds).map(OrientGraph::createRecordId).peek(id -> checkId(id));
        Stream<ORecord> records = ids.filter(ORID::isValid).map(id -> getRecord(id)).filter(r -> r != null);
        return records.map(toA).iterator();
    }
}
 
开发者ID:orientechnologies,项目名称:orientdb-gremlin,代码行数:13,代码来源:OrientGraph.java

示例3: findResources

import com.orientechnologies.orient.core.iterator.ORecordIteratorClass; //导入依赖的package包/类
@NotNull
@Override
public Observable<Resource> findResources(@NotNull RClass rClass) {
  return Observable.create(subscriber -> {
    subscriber.onStart();
    try (ODatabaseDocument conn = getConnection()) {
      ORecordIteratorClass<ODocument> it = conn.browseClass(schemaMapping.getRTypeMapping(rClass).getOClassName());
      StreamSupport.stream(it.spliterator(), false)
          .map(documentMapper::loadResource)
          .forEach(subscriber::onNext);
    }
    subscriber.onCompleted();
  });

}
 
开发者ID:lfridael,项目名称:resourceful-java-prototype,代码行数:16,代码来源:OrientDbResourceRepository.java


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