Package com.mongodb

Examples of com.mongodb.DBCursor.skip()


            if (batchSize != null) {
                ret.batchSize(batchSize.intValue());
            }

            if (numToSkip != null) {
                ret.skip(numToSkip.intValue());
            }

            if (limit != null) {
                ret.limit(limit.intValue());
            }
View Full Code Here


      cursor.sort( query.getOrderBy() );
    }

    // apply firstRow/maxRows if present
    if ( queryParameters.getRowSelection().getFirstRow() != null ) {
      cursor.skip( queryParameters.getRowSelection().getFirstRow() );
    }

    if ( queryParameters.getRowSelection().getMaxRows() != null ) {
      cursor.limit( queryParameters.getRowSelection().getMaxRows() );
    }
View Full Code Here

        if (sort != null)
            dbCursor.sort(translateMapToDBObject(sort));

        if (skip != null)
            dbCursor.skip(skip);

        if (limit != null)
            dbCursor.limit(limit);

        try {
View Full Code Here

      cursor.sort( orderBy );
    }

    // apply firstRow/maxRows if present
    if ( queryParameters.getRowSelection().getFirstRow() != null ) {
      cursor.skip( queryParameters.getRowSelection().getFirstRow() );
    }

    if ( queryParameters.getRowSelection().getMaxRows() != null ) {
      cursor.limit( queryParameters.getRowSelection().getMaxRows() );
    }
View Full Code Here

      cursor.sort( query.getOrderBy() );
    }

    // apply firstRow/maxRows if present
    if ( queryParameters.getRowSelection().getFirstRow() != null ) {
      cursor.skip( queryParameters.getRowSelection().getFirstRow() );
    }

    if ( queryParameters.getRowSelection().getMaxRows() != null ) {
      cursor.limit( queryParameters.getRowSelection().getMaxRows() );
    }
View Full Code Here

      }
      if (chunk.containsField(DbManager.max_)) {
        dbc = dbc.addSpecial(DbManager.max_, chunk.get(DbManager.max_));
      }
    }
    dbc = dbc.skip(nSkip).limit(nLimit).batchSize(1000);
    if (null == chunk) {
      int nCount = dbc.count() - nSkip;
      if (nCount < 0) nCount = 0;
      System.out.println("Found " + nCount + " records to sync, process first " + (0==nLimit?nCount:nLimit));
      if (0 == nCount) { // Nothing to do...
View Full Code Here

      }
      if (chunk.containsField(DbManager.max_)) {
        dbc = dbc.addSpecial(DbManager.max_, chunk.get(DbManager.max_));
      }
    }
    dbc = dbc.skip(nSkip).limit(nLimit).batchSize(1000);
    if (null == chunk) {
      int nCount = dbc.count() - nSkip;
      if (nCount < 0) nCount = 0;
      System.out.println("Found " + nCount + " records to sync, process first " + (0==nLimit?nCount:nLimit));
      if (0 == nCount) { // Nothing to do...
View Full Code Here

      }
      if (chunk.containsField(DbManager.max_)) {
        dbc = dbc.addSpecial(DbManager.max_, chunk.get(DbManager.max_));
      }
    }
    dbc = dbc.skip(nSkip).limit(nLimit).batchSize(1000);
    if (null == chunk) {
      int nCount = dbc.count() - nSkip;
      if (nCount < 0) nCount = 0;
      System.out.println("Found " + nCount + " records to sync, process first " + (0==nLimit?nCount:nLimit));
      if (0 == nCount) { // Nothing to do...
View Full Code Here

            public Object doRun() throws Exception {
                try {
                    try {
                        DBCursor cur = col.find(query, fields);
                        if (skip > 0) {
                            cur.skip(skip);
                        }
                        if (batchSize != 0) {
                            cur.batchSize(batchSize);
                        }
                        if (sort != null) {
View Full Code Here

        DBCursor cursor = dbColl.find(query, fields);
        cursor.setDecoderFactory(this.ds.getDecoderFact());

        if (offset > 0)
            cursor.skip(offset);
        if (limit > 0)
            cursor.limit(limit);
        if (batchSize > 0)
            cursor.batchSize(batchSize);
        if (snapshotted)
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.