Examples of nextBatch()


Examples of er.extensions.eof.ERXFetchSpecificationBatchIterator.nextBatch()

      ERXFetchSpecificationBatchIterator fsIterator = new ERXFetchSpecificationBatchIterator(fs, ec);

      // Loop for a period of time
      while (fsIterator.hasNext() && !_isStopped) {
        @SuppressWarnings("unchecked")
        NSArray<ResultItem> batch = fsIterator.nextBatch();
       
        for (ResultItem resultItem : batch) {
          resultItem.setWorkflowState(ResultItem.WORKFLOW_CHECKING_FACTORIAL);
          performFactorialProcessing(resultItem);
          resultItem.setWorkflowState(ResultItem.WORKFLOW_PROCESSING_COMPLETE);
View Full Code Here

Examples of er.extensions.eof.ERXFetchSpecificationBatchIterator.nextBatch()

            try {
                EOFetchSpecification fs = new EOFetchSpecification(entity.name(), null, null);
                ERXFetchSpecificationBatchIterator iterator = new ERXFetchSpecificationBatchIterator(fs);
                iterator.setEditingContext(ec);
                while(iterator.hasNextBatch()) {
                    NSArray objects = iterator.nextBatch();
                    if(iterator.currentBatchIndex() % treshhold == 0) {
                        ec.unlock();
                        // ec.dispose();
                        ec = ERXEC.newEditingContext();
                        ec.lock();
View Full Code Here

Examples of er.extensions.eof.ERXFetchSpecificationBatchIterator.nextBatch()

            try {
                EOFetchSpecification fs = new EOFetchSpecification(entityName, null, null);
                ERXFetchSpecificationBatchIterator iterator = new ERXFetchSpecificationBatchIterator(fs);
                iterator.setEditingContext(ec);
                while (iterator.hasNextBatch()) {
                    NSArray objects = iterator.nextBatch();
                    if (iterator.currentBatchIndex() % treshhold == 0) {
                        ec.unlock();
                        // ec.dispose();
                        ec = ERXEC.newEditingContext();
                        ec.lock();
View Full Code Here

Examples of er.extensions.eof.ERXFetchSpecificationBatchIterator.nextBatch()

        while (iterator.hasNextBatch()) {
            EOEditingContext temp = ERXEC.newEditingContext();
            temp.lock();
            try {
                iterator.setEditingContext(temp);
                sendMailMessages(iterator.nextBatch());
            } finally {
                temp.unlock();
            }
            temp.dispose();
        }
View Full Code Here

Examples of org.modeshape.jcr.query.NodeSequence.nextBatch()

            QueryResults result = query.execute();
            if (result.isEmpty()) return false;
            if (result.getRowCount() < 0) {
                // Try to get the first row ...
                NodeSequence seq = result.getRows();
                Batch batch = seq.nextBatch();
                while (batch != null) {
                    if (batch.hasNext()) return true;
                    // It's not common for the first batch may be empty, but it's possible. So try the next batch ...
                    batch = seq.nextBatch();
                }
View Full Code Here

Examples of org.modeshape.jcr.query.NodeSequence.nextBatch()

                NodeSequence seq = result.getRows();
                Batch batch = seq.nextBatch();
                while (batch != null) {
                    if (batch.hasNext()) return true;
                    // It's not common for the first batch may be empty, but it's possible. So try the next batch ...
                    batch = seq.nextBatch();
                }
                return false;
            }
            return result.getRowCount() > 0;
        } catch (RepositoryException e) {
View Full Code Here

Examples of org.teiid.query.processor.BatchedUpdatePlan.nextBatch()

        for (int i = 0; i < commandsPerPlan.length; i++) {
            totalCommands += commandsPerPlan[i];
            plans.add(new FakeProcessorPlan(commandsPerPlan[i]));
        }
        BatchedUpdatePlan plan = new BatchedUpdatePlan(plans, totalCommands, null);
        TupleBatch batch = plan.nextBatch();
        assertEquals(totalCommands, batch.getRowCount());
        for (int i = 1; i <= totalCommands; i++) {
            assertEquals(new Integer(1), batch.getTuple(i).get(0));
        }
    }
View Full Code Here

Examples of org.teiid.query.processor.relational.RelationalPlan.nextBatch()

   
    public void testNoRowsFirstBatch() throws Exception {
        RelationalNode node = new FakeRelationalNode(0, new List[0]);
       
        RelationalPlan plan = new RelationalPlan(node);
        TupleBatch batch = plan.nextBatch();
        assertTrue("Did not get terminator batch", batch.getTerminationFlag()); //$NON-NLS-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.