コード例 #1
0
  public ESRangeQuery rangeQuery(
      ESPrimaryVersionSpec source,
      int upper,
      int lower,
      boolean allVersions,
      boolean incoming,
      boolean outgoing,
      boolean includeChangePackages) {

    PrimaryVersionSpec sourceVersionSpec = ((ESPrimaryVersionSpecImpl) source).getInternalAPIImpl();

    RangeQuery<?> rangeQuery =
        HistoryQueryBuilder.rangeQuery(
            sourceVersionSpec,
            upper,
            lower,
            allVersions,
            incoming,
            outgoing,
            includeChangePackages);

    ESRangeQueryImpl<?> apiImpl = rangeQuery.getAPIImpl();
    return apiImpl;
  }
コード例 #2
0
 /**
  * Factory method for range query.
  *
  * @param source source version
  * @param upper upper limit
  * @param lower lower limit
  * @param allVersions include all versions, from all branches
  * @param incoming include incoming versions, only if allVersions is false
  * @param outgoing include outgoing versions
  * @param includeCp include changepackges
  * @return query
  */
 public static RangeQuery<?> rangeQuery(
     PrimaryVersionSpec source,
     int upper,
     int lower,
     boolean allVersions,
     boolean incoming,
     boolean outgoing,
     boolean includeCp) {
   final RangeQuery<?> query = VersioningFactory.eINSTANCE.createRangeQuery();
   query.setSource(ModelUtil.clone(source));
   query.setUpperLimit(upper);
   query.setLowerLimit(lower);
   query.setIncludeAllVersions(allVersions);
   query.setIncludeIncoming(incoming);
   query.setIncludeOutgoing(outgoing);
   query.setIncludeChangePackages(includeCp);
   return query;
 }