Examples of BatchResult


Examples of com.ibatis.sqlmap.engine.execution.BatchResult

    sms.close();
    when(sms.getCurrentConnection()).thenReturn(null);
    sms.setUserConnection(null);
    sms.startBatch();
    when(sms.update("updateFoo", new Foo("bar"))).thenReturn(1);
    List<BatchResult> results = Collections.singletonList(new BatchResult("updateFoo", "update foo"));
    results.get(0).setUpdateCounts(new int[] {0});
    when(sms.executeBatchDetailed()).thenReturn(results);
    try {
      writer.write(Collections.singletonList(new Foo("bar")));
      fail("Expected EmptyResultDataAccessException");
View Full Code Here

Examples of com.sforce.async.BatchResult

      conn=getConnection();
      Iterator<Text> batchIterator = batches.iterator();
      String jobIdString = jobId.toString();
      jobId.set(jobIdString);
      while (batchIterator.hasNext()) {
        BatchResult result = conn.getBatchResult(jobIdString, batchIterator.next().toString());
        batchResultText.set(result.toString());
        logger.debug("Job Id " + jobIdString + " and Batch " + result);
        context.write(jobId, batchResultText);
      }     
       }
       catch(Exception e) {
View Full Code Here

Examples of org.apache.ibatis.executor.BatchResult

      List results = sqlMap.executeBatchDetailed();
      sqlMap.commitTransaction();

      assertEquals(3, results.size());

      BatchResult br = (BatchResult) results.get(0);
      assertEquals(5, br.getUpdateCounts().length);

      br = (BatchResult) results.get(1);
      assertEquals(1, br.getUpdateCounts().length);

      br = (BatchResult) results.get(2);
      assertEquals(4, br.getUpdateCounts().length);

    } catch (BatchException e) {
      fail(e.getMessage());
    } catch (SQLException e) {
      fail(e.getMessage());
View Full Code Here

Examples of org.apache.ibatis.executor.BatchResult

      BatchUpdateException bue = e.getBatchUpdateException();
      assertEquals(1, bue.getUpdateCounts().length);

      List results = e.getSuccessfulBatchResults();
      assertEquals(2, results.size());
      BatchResult br = (BatchResult) results.get(0);
      assertEquals(5, br.getUpdateCounts().length);
      br = (BatchResult) results.get(1);
      assertEquals(1, br.getUpdateCounts().length);
    } catch (SQLException e) {
      fail(e.getMessage());
    } finally {
      try {
        sqlMap.endTransaction();
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.