org.vertexium.query.Query.skip()方法的使用及代码示例

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

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

Query.skip介绍

[英]Skips the given number of items.
[中]跳过给定数量的项目。

代码示例

代码示例来源:origin: org.visallo/visallo-model-vertexium

@Override
public Iterable<User> find(int skip, int limit) {
  QueryResultsIterable<Vertex> userVertices = graph.query(authorizations)
      .has(VisalloProperties.CONCEPT_TYPE.getPropertyName(), userConceptId)
      .skip(skip)
      .limit(limit)
      .vertices();
  return new ConvertingIterable<Vertex, User>(userVertices) {
    @Override
    protected User convert(Vertex vertex) {
      return createFromVertex(vertex);
    }
  };
}

代码示例来源:origin: org.visallo/visallo-model-vertexium

@Override
public Iterable<User> findByStatus(int skip, int limit, UserStatus status) {
  QueryResultsIterable<Vertex> userVertices = graph.query(authorizations)
      .has(VisalloProperties.CONCEPT_TYPE.getPropertyName(), userConceptId)
      .has(UserVisalloProperties.STATUS.getPropertyName(), status.toString())
      .skip(skip)
      .limit(limit)
      .vertices();
  return new ConvertingIterable<Vertex, User>(userVertices) {
    @Override
    protected User convert(Vertex vertex) {
      return createFromVertex(vertex);
    }
  };
}

代码示例来源:origin: org.vertexium/vertexium-test

.skip(0)
.limit(1)
.vertexIds();
.skip(1)
.limit(1)
.vertexIds();
.skip(2)
.limit(1)
.vertexIds();
.skip(0)
.limit(1)
.vertices());

代码示例来源:origin: org.visallo/visallo-core

@Override
public QueryResultsIterableSearchResults run(
    SearchOptions searchOptions,
    User user,
    Authorizations authorizations
) {
  JSONArray filterJson = getFilterJson(searchOptions, searchOptions.getWorkspaceId());
  QueryAndData queryAndData = getQuery(searchOptions, authorizations);
  applyFiltersToQuery(queryAndData, filterJson, user, searchOptions);
  applyConceptTypeFilterToQuery(queryAndData, searchOptions);
  applyEdgeLabelFilterToQuery(queryAndData, searchOptions);
  applySortToQuery(queryAndData, searchOptions);
  applyAggregationsToQuery(queryAndData, searchOptions);
  applyExtendedDataFilters(queryAndData, searchOptions);
  EnumSet<FetchHint> fetchHints = getFetchHints(searchOptions);
  Long size = searchOptions.getOptionalParameter("size", defaultSearchResultCount);
  if (size != null) {
    queryAndData.getQuery().limit(size);
  }
  Long offset = searchOptions.getOptionalParameter("offset", 0L);
  if (offset != null) {
    queryAndData.getQuery().skip(offset.intValue());
  }
  QueryResultsIterable<? extends VertexiumObject> searchResults = getSearchResults(queryAndData, fetchHints);
  return new QueryResultsIterableSearchResults(searchResults, queryAndData, offset, size);
}

代码示例来源:origin: visallo/vertexium

.skip(0)
.limit(1)
.vertexIds();
.skip(1)
.limit(1)
.vertexIds();
.skip(2)
.limit(1)
.vertexIds();
.skip(0)
.limit(1)
.vertices());

相关文章