/** * Specify that the result set should be concurrent updatable. * * This will allow the update methods to be called on the result set produced by this * Query. * * @return the modified query */ public Query concurrentUpdatable() { getContext().setConcurrentUpdatable(true); return this; } }
@Test public void testShouldNotBeAbleToCombineGeneratedKeysAndConcurrentUpdatable() { final StatementContext context = StatementContextAccess.createContext(); context.setReturningGeneratedKeys(true); assertThatThrownBy(() -> context.setConcurrentUpdatable(true)).isInstanceOf(IllegalArgumentException.class); }
@Test public void testShouldNotBeAbleToCombineConcurrentUpdatableAndGeneratedKeys() { final StatementContext context = StatementContextAccess.createContext(); context.setConcurrentUpdatable(true); assertThatThrownBy(() -> context.setReturningGeneratedKeys(true)).isInstanceOf(IllegalArgumentException.class); }
/** * Specify that the result set should be concurrent updatable. * * This will allow the update methods to be called on the result set produced by this * Query. * * @return the modified query */ public Query concurrentUpdatable() { getContext().setConcurrentUpdatable(true); return this; } }