Package org.teiid.jdbc.BatchResults

Examples of org.teiid.jdbc.BatchResults.Batch


       
        assertFalse(batchResults.absolute(-100));
    }
   
    @Test public void testAbsoluteWithLastRow() throws Exception{
      Batch batch = new Batch(createBatch(1, 10), 1, 10, false);
      batch.setLastRow(50);
      MockBatchFetcher mbf = new MockBatchFetcher();
      mbf.setUseLastRow(true);
      BatchResults batchResults = new BatchResults(mbf, batch, BatchResults.DEFAULT_SAVED_BATCHES);
        assertTrue(batchResults.absolute(41));
        assertEquals(Arrays.asList(41), batchResults.getCurrentRow());
View Full Code Here


              endRow = i;
          } else if(endRow > totalRows) {
              endRow = totalRows;
              isLast = true;
          }
      Batch batch = new Batch(createBatch(beginRow, endRow), beginRow, endRow, isLast);
      if (useLastRow) {
        batch.setLastRow(totalRows);
      }
      return batch;
    }
View Full Code Here

  }

  private Batch getCurrentBatch(ResultsMessage currentResultMsg) {
    this.updatedPlanDescription = currentResultMsg.getPlanDescription();
    boolean isLast = currentResultMsg.getResults().length == 0 || currentResultMsg.getFinalRow() == currentResultMsg.getLastRow();
    Batch result = new Batch(currentResultMsg.getResults(), currentResultMsg.getFirstRow(), currentResultMsg.getLastRow(), isLast);
    result.setLastRow(currentResultMsg.getFinalRow());
    return result;
  }
View Full Code Here

TOP

Related Classes of org.teiid.jdbc.BatchResults.Batch

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.