Examples of startBatch()


Examples of com.alibaba.druid.support.ibatis.SqlMapClientWrapper.startBatch()

                error = ex;
            }
            Assert.assertNotNull(error);
        }
       
        wrapper.startBatch();
        wrapper.executeBatch();
        wrapper.executeBatchDetailed();
    }
}
View Full Code Here

Examples of com.alibaba.druid.support.ibatis.SqlMapExecutorWrapper.startBatch()

                error = ex;
            }
            Assert.assertNotNull(error);
        }
       
        wrapper.startBatch();
        wrapper.executeBatch();
        wrapper.executeBatchDetailed();
    }
}
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.startBatch()

        throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex);
      }

      // Execute given callback...
      try {
        session.startBatch();
        for (T item : items) {
          session.update(statementId, item);
        }
        try {
          return session.executeBatchDetailed();
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.startBatch()

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

Examples of com.ibatis.sqlmap.client.SqlMapSession.startBatch()

    SqlMapSession sms = mock(SqlMapSession.class);
    when(smc.openSession()).thenReturn(sms);
    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 {
View Full Code Here

Examples of com.ibatis.sqlmap.client.SqlMapSession.startBatch()

    SqlMapSession sms = mock(SqlMapSession.class);
    when(smc.openSession()).thenReturn(sms);
    sms.close();
    when(sms.getCurrentConnection()).thenReturn(null);
    sms.setUserConnection(null);
    sms.startBatch();
    when(sms.update("updateFoo", new Foo("bar"))).thenThrow(ex);
    try {
      writer.write(Collections.singletonList(new Foo("bar")));
      fail("Expected RuntimeException");
    }
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.startBatch()

    @Test
    public void should_apply_interceptors_after_flush_for_batch() throws Exception {
        // Given
        final Batch batchingPM = pmf.createBatch();
        batchingPM.startBatch();

        CompleteBean entity = builder().randomId().name("DuyHai").label("label").buid();

        // When
        batchingPM.insert(entity);
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.startBatch()

        entity.setName("name");

        final EntityWithConsistencyLevelOnClassAndField managed = manager.insert(entity);

        Batch batch = pmf.createBatch();
        batch.startBatch(ONE);
        managed.setName("changed_name");
        logAsserter.prepareLogLevel();

        batch.update(managed);
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.startBatch()

        entity.setId(RandomUtils.nextLong(0,Long.MAX_VALUE));
        entity.setName("name");
        entity.setCount(CounterBuilder.incr());

        Batch batchEm = pmf.createBatch();
        batchEm.startBatch(THREE);
        entity = batchEm.insert(entity);

        expectedEx.expect(UnavailableException.class);
        expectedEx.expectMessage("Not enough replica available for query at consistency THREE (3 required but only 1 alive)");
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.startBatch()

        manager.insert(tweet1);

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(QUORUM);

        Tweet foundTweet1 = manager.find(Tweet.class, tweet1.getId());
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.