Examples of limit()


Examples of com.google.common.base.Splitter.limit()

   */
  private static String[] split(String stringToSplit, String separator,
      int limit) {
    Splitter splitter = Splitter.on(separator).trimResults();
    if (limit > 0) {
      splitter = splitter.limit(limit);
    }
    return Iterables.toArray(splitter.split(stringToSplit), String.class);
  }

  /**
 
View Full Code Here

Examples of com.google.gerrit.server.query.change.ChangeQueryBuilder.limit()

    HashSet<Change.Id> ids = new HashSet<Change.Id>();
    try {
      ChangeQueryBuilder builder = queryBuilder.create(currentUser.get());
      Predicate<ChangeData> visibleToMe = builder.is_visible();
      Predicate<ChangeData> q = builder.parse(query);
      q = Predicate.and(q, builder.sortkey_before("z"), builder.limit(2), visibleToMe);

      ChangeQueryRewriter rewriter = queryRewriter.get();
      Predicate<ChangeData> s = rewriter.rewrite(q);
      if (!(s instanceof ChangeDataSource)) {
        s = rewriter.rewrite(Predicate.and(builder.status_open(), q));
View Full Code Here

Examples of com.google.gwt.uibinder.client.UiChild.limit()

      JMethod[] methods = ownerType.getMethods();
      for (JMethod method : methods) {
        UiChild annotation = method.getAnnotation(UiChild.class);
        if (annotation != null) {
          String tag = annotation.tagname();
          int limit = annotation.limit();
          if (tag.equals("")) {
            String name = method.getName();
            if (name.startsWith("add")) {
              tag = StringCase.toLower(name.substring(3));
            } else {
View Full Code Here

Examples of com.hazelcast.nio.DynamicByteBuffer.limit()

        if (buffer == null) {
            return new byte[0];
        }
        final DynamicByteBuffer duplicate = buffer.duplicate();
        duplicate.flip();
        final byte newBuffer[] = new byte[duplicate.limit()];
        duplicate.get(newBuffer);
        return newBuffer;
    }

    public void clear() {
View Full Code Here

Examples of com.intersys.gds.query.Between.limit()

    * @param to to value
    */
  public  void between(String key, int from, int to) {
        System.out.println("Between query. Key = " + key +" between: " + from + " and " + to);
        Query query = new Between(key,from,to);
        query.limit(15);
        executeQuery(query);
    }

    /** Perform a simple Equals query.
    *
 
View Full Code Here

Examples of com.intersys.gds.query.Query.limit()

    * @param to to value
    */
  public  void between(String key, int from, int to) {
        System.out.println("Between query. Key = " + key +" between: " + from + " and " + to);
        Query query = new Between(key,from,to);
        query.limit(15);
        executeQuery(query);
    }

    /** Perform a simple Equals query.
    *
 
View Full Code Here

Examples of com.lambdaworks.redis.SortArgs.limit()

    if (params.getByPattern() != null) {
      args.by(new String(params.getByPattern(), Charsets.ASCII));
    }

    if (params.getLimit() != null) {
      args.limit(params.getLimit().getStart(), params.getLimit().getCount());
    }

    if (params.getGetPattern() != null) {
      byte[][] pattern = params.getGetPattern();
      for (byte[] bs : pattern) {
View Full Code Here

Examples of com.mongodb.DBCursor.limit()

    if ( queryParameters.getRowSelection().getFirstRow() != null ) {
      cursor.skip( queryParameters.getRowSelection().getFirstRow() );
    }

    if ( queryParameters.getRowSelection().getMaxRows() != null ) {
      cursor.limit( queryParameters.getRowSelection().getMaxRows() );
    }

    return new MongoDBResultsCursor( cursor, entityKeyMetadata );
  }
View Full Code Here

Examples of com.mysema.query.jpa.hibernate.HibernateQuery.limit()

    }
    if (offset > -1) {
      query.offset(offset);
    }
    if (limit > -1) {
      query.limit(limit);
    }
    int timeout = config.getApplicationSettings().getQueryTimeout();
    if (timeout > 0) {
      query.setTimeout(timeout / 1000);
    }
View Full Code Here

Examples of com.netflix.astyanax.serializers.CompositeRangeBuilder.limit()

     * @return
     */
    public RowQuery<byte[], byte[]> createRowQuery() {
      CompositeRangeBuilder range = setupRangeBuilder(from, to, info1, false);
      if(batchSize != null)
        range = range.limit(batchSize);     
      return createBasicRowQuery(rowKey, info1, range);
    }
   
    /**
     * For some dang reason with astyanax, we have to recreate the row query from scratch before we re-use it for
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.