Examples of limit()


Examples of org.jboss.aerogear.controller.router.rest.pagination.PaginationProperties.limit()

    @Test
    public void offset() {
        final PaginationProperties params = new PaginationProperties(10, 25, 100);
        assertThat(params.offset()).isEqualTo(10);
        assertThat(params.limit()).isEqualTo(25);
        assertThat(params.total().get()).isEqualTo(100);
    }

    @Test
    public void nextOffset() {
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataInputStream.limit()

    public void testLimit() {
        byte[] buf=new byte[100];
        buf[0]='B'; buf[1]='e'; buf[2]='l'; buf[3]='a';
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf);
        assert in.position() == 0;
        assert in.limit() == buf.length;
        assert in.capacity() == buf.length;

        in=new ByteArrayDataInputStream(buf, 0, 4);
        assert in.position() == 0;
        assert in.limit() == 4;
View Full Code Here

Examples of org.lwjgl.PointerBuffer.limit()

  protected PointerBuffer getSizesBuffer(final T object, final int param_name) {
    final int size = getInfoSizeArraySize(object, param_name);

    final PointerBuffer buffer = APIUtil.getBufferPointer(size);
    buffer.limit(size);

    getInfo(object, param_name, buffer.getBuffer(), null);

    return buffer;
  }
View Full Code Here

Examples of org.modeshape.jcr.api.query.qom.QueryObjectModelFactory.limit()

        columns[0] = qomFactory.column("car", "car:maker", "maker");
        columns[1] = qomFactory.column("car", "car:model", "car:model");
        columns[2] = qomFactory.column("car", "car:year", "car:year");
        columns[3] = qomFactory.column("car", "car:userRating", "car:userRating");
        Ordering[] orderings = null;
        Limit limit = qomFactory.limit(2, 0);
        boolean isDistinct = false;

        // Build and execute the query ...
        SelectQuery selectQuery = qomFactory.select(selector, constraint, orderings, columns, limit, isDistinct);
        Query query1 = qomFactory.createQuery(selectQuery);
View Full Code Here

Examples of org.nutz.mongo.util.MCur.limit()

    pager.setPage(query.page);
    pager.setPageSize(query.pageSize);
    if (query.skip() > 0)
      cur.skip(query.skip());
    if (query.limit() > 0
      cur.limit(query.limit());
    pager.setData(dao.find(Question.class, query.q, cur));
    return pager;
  }
 
 
View Full Code Here

Examples of org.springframework.data.mongodb.core.query.BasicQuery.limit()

        query.setLevel("ERROR");
        query.setKeyWord("111");
        System.out.println(query.toQuery().toString());

        Query bquery = new BasicQuery(query.toQuery());
        bquery.limit(100);

        bquery.sort().on("$timestamp", Order.DESCENDING);
        System.out.println(bquery.getQueryObject());
        System.out.println(bquery.getFieldsObject());
        System.out.println(bquery.getSortObject());
View Full Code Here

Examples of org.springframework.data.mongodb.core.query.Query.limit()

    MongoQueryCreator creator = new MongoQueryCreator(tree, accessor, context, isGeoNearQuery);
    Query query = creator.createQuery();

    if (tree.isLimiting()) {
      query.limit(tree.getMaxResults());
    }

    TextCriteria textCriteria = accessor.getFullText();
    if (textCriteria != null) {
      query.addCriteria(textCriteria);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgLogCommand.limit()

    for (String b : cmdLineOpts.getList("-b", "--branches")) {
      cmd.branch(b);
    }
    int limit = cmdLineOpts.getSingleInt(-1, "-l", "--limit");
    if (limit != -1) {
      cmd.limit(limit);
    }
    cmd.set(noCancel).set(noProgress);
    List<String> files = cmdLineOpts.getList("");
    final long start = System.currentTimeMillis();
    if (files.isEmpty()) {
View Full Code Here

Examples of org.xtreemfs.foundation.buffer.ReusableBuffer.limit()

            // reset the old checksum to 0, before calculating a new one
            buf.position(Integer.SIZE / 8);
            buf.putInt(0);
            buf.position(0);
           
            csumAlgo.update(buf.array(), 0, buf.limit());
            int cPos = buf.position();
           
            // write the checksum to the buffer
            buf.position(Integer.SIZE / 8);
            buf.putInt((int) csumAlgo.getValue());
View Full Code Here

Examples of redis.clients.jedis.SortingParams.limit()

  for (int n = 10; n > 0; n--) {
      jedis.lpush("foo", String.valueOf(n));
  }

  SortingParams sp = new SortingParams();
  sp.limit(0, 3);

  List<String> result = jedis.sort("foo", sp);

  List<String> expected = new ArrayList<String>();
  expected.add("1");
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.