Package com.pardot.rhombus.cobject.statement

Examples of com.pardot.rhombus.cobject.statement.CQLExecutorIterator


      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems);


      assertTrue(cqlExecutorIterator.hasNext());
      assertNotNull(cqlExecutorIterator.next());
      assertFalse(cqlExecutorIterator.hasNext());
      assertNull(cqlExecutorIterator.next());

    }
View Full Code Here


      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems);


      for (int i=0 ; i< nDataItems; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here

      CObjectCQLGenerator cqlGenerator = om.getCqlGenerator_ONLY_FOR_TESTING();
      CQLStatementIterator unBoundedIterator = cqlGenerator.makeCQLforList(objectType, criteria, false);

      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems-1);


      for (int i=0 ; i < nDataItems ; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here

      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize((nDataItems/5));


      for (int i=0 ; i< nDataItems; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here

TOP

Related Classes of com.pardot.rhombus.cobject.statement.CQLExecutorIterator

Copyright © 2018 www.massapicom. 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.