File tree Expand file tree Collapse file tree 7 files changed +4
-93
lines changed
ebean-api/src/main/java/io/ebean
ebean-core/src/main/java/io/ebeaninternal/server
ebean-test/src/test/java/io/ebean/xtest/base Expand file tree Collapse file tree 7 files changed +4
-93
lines changed Original file line number Diff line number Diff line change @@ -221,21 +221,6 @@ default OrderBy<T> order() {
221221 */
222222 int delete ();
223223
224- /**
225- * @deprecated migrate to {@link #usingTransaction(Transaction)} then delete().
226- * <p>
227- * Execute as a delete query deleting the 'root level' beans that match the predicates
228- * in the query.
229- * <p>
230- * Note that if the query includes joins then the generated delete statement may not be
231- * optimal depending on the database platform.
232- * </p>
233- *
234- * @return the number of rows that were deleted.
235- */
236- @ Deprecated (forRemoval = true , since = "13.1.0" )
237- int delete (Transaction transaction );
238-
239224 /**
240225 * Execute as a update query.
241226 *
@@ -244,17 +229,6 @@ default OrderBy<T> order() {
244229 */
245230 int update ();
246231
247- /**
248- * @deprecated migrate to {@link #usingTransaction(Transaction)} then update().
249- * <p>
250- * Execute as a update query with the given transaction.
251- *
252- * @return the number of rows that were updated.
253- * @see UpdateQuery
254- */
255- @ Deprecated (forRemoval = true , since = "13.1.0" )
256- int update (Transaction transaction );
257-
258232 /**
259233 * Execute the query returning true if a row is found.
260234 * <p>
Original file line number Diff line number Diff line change @@ -218,29 +218,6 @@ enum LockWait {
218218 */
219219 boolean isCountDistinct ();
220220
221- /**
222- * @deprecated migrate to {@link #usingTransaction(Transaction)} then delete().
223- * <p>
224- * Execute as a delete query returning the number of rows deleted using the given transaction.
225- * <p>
226- * Note that if the query includes joins then the generated delete statement may not be
227- * optimal depending on the database platform.
228- *
229- * @return the number of beans/rows that were deleted.
230- */
231- @ Deprecated (forRemoval = true , since = "14.1.0" )
232- int delete (Transaction transaction );
233-
234- /**
235- * @deprecated migrate to {@link #usingTransaction(Transaction)} then update().
236- * <p>
237- * Execute the UpdateQuery returning the number of rows updated using the given transaction.
238- *
239- * @return the number of beans/rows updated.
240- */
241- @ Deprecated (forRemoval = true , since = "14.1.0" )
242- int update (Transaction transaction );
243-
244221 /**
245222 * Execute the UpdateQuery returning the number of rows updated.
246223 *
Original file line number Diff line number Diff line change @@ -332,21 +332,11 @@ public int delete() {
332332 return query .delete ();
333333 }
334334
335- @ Override
336- public int delete (Transaction transaction ) {
337- return query .delete (transaction );
338- }
339-
340335 @ Override
341336 public int update () {
342337 return query .update ();
343338 }
344339
345- @ Override
346- public int update (Transaction transaction ) {
347- return query .update (transaction );
348- }
349-
350340 @ Override
351341 public FutureIds <T > findFutureIds () {
352342 return query .findFutureIds ();
Original file line number Diff line number Diff line change @@ -337,21 +337,11 @@ public int delete() {
337337 return exprList .delete ();
338338 }
339339
340- @ Override
341- public int delete (Transaction transaction ) {
342- return exprList .delete (transaction );
343- }
344-
345340 @ Override
346341 public int update () {
347342 return exprList .update ();
348343 }
349344
350- @ Override
351- public int update (Transaction transaction ) {
352- return exprList .update (transaction );
353- }
354-
355345 @ Override
356346 public Query <T > asOf (Timestamp asOf ) {
357347 return exprList .asOf (asOf );
Original file line number Diff line number Diff line change @@ -340,21 +340,11 @@ public int delete() {
340340 throw new RuntimeException ("EB102: Only select() and fetch() clause is allowed on FetchGroup" );
341341 }
342342
343- @ Override
344- public int delete (Transaction transaction ) {
345- throw new RuntimeException ("EB102: Only select() and fetch() clause is allowed on FetchGroup" );
346- }
347-
348343 @ Override
349344 public int update () {
350345 throw new RuntimeException ("EB102: Only select() and fetch() clause is allowed on FetchGroup" );
351346 }
352347
353- @ Override
354- public int update (Transaction transaction ) {
355- throw new RuntimeException ("EB102: Only select() and fetch() clause is allowed on FetchGroup" );
356- }
357-
358348 @ Override
359349 public int findCount () {
360350 throw new RuntimeException ("EB102: Only select() and fetch() clause is allowed on FetchGroup" );
Original file line number Diff line number Diff line change @@ -1481,21 +1481,11 @@ public final int delete() {
14811481 return server .delete (this );
14821482 }
14831483
1484- @ Override
1485- public final int delete (Transaction transaction ) {
1486- return server .delete (this );
1487- }
1488-
14891484 @ Override
14901485 public final int update () {
14911486 return server .update (this );
14921487 }
14931488
1494- @ Override
1495- public final int update (Transaction transaction ) {
1496- return server .update (this );
1497- }
1498-
14991489 @ Override
15001490 public final <A > List <A > findIds () {
15011491 // a copy of this query is made in the server
Original file line number Diff line number Diff line change @@ -356,14 +356,14 @@ public void updateQuery_withExplicitTransaction() {
356356 .setRaw ("status = coalesce(status, ?)" , Customer .Status .ACTIVE )
357357 .where ()
358358 .gt ("id" , 10000 )
359- .update ( transaction ); // . usingTransaction(transaction).update();
359+ .usingTransaction (transaction ).update ();
360360
361361 rowsQuery = server
362362 .update (Customer .class )
363363 .setRaw ("status = coalesce(status, ?)" , Customer .Status .ACTIVE )
364364 .where ()
365365 .gt ("id" , 10001 )
366- .query ( ).update (transaction );
366+ .usingTransaction ( transaction ).update ();
367367
368368 transaction .commit ();
369369 }
@@ -387,13 +387,13 @@ public void deleteQuery_withExplicitTransaction() {
387387 .update (Customer .class )
388388 .where ()
389389 .gt ("id" , 10000 )
390- .delete (transaction );
390+ .usingTransaction (transaction ). delete ( );
391391
392392 rowsQuery = server
393393 .update (Customer .class )
394394 .where ()
395395 .gt ("id" , 10001 )
396- .query ( ).delete (transaction );
396+ .usingTransaction ( transaction ).delete ();
397397
398398 transaction .commit ();
399399 }
You can’t perform that action at this time.
0 commit comments