diff --git a/src/main/java/com/avaje/ebean/Ebean.java b/src/main/java/com/avaje/ebean/Ebean.java index d1777b792a..eb0427eb7b 100644 --- a/src/main/java/com/avaje/ebean/Ebean.java +++ b/src/main/java/com/avaje/ebean/Ebean.java @@ -750,14 +750,6 @@ public static void deleteAll(Class beanType, Collection ids) { serverMgr.getDefaultServer().deleteAll(beanType, ids); } - /** - * Delete all the beans from a Collection. - */ - @Deprecated - public static int delete(Collection beans) throws OptimisticLockException { - return serverMgr.getDefaultServer().deleteAll(beans); - } - /** * Delete all the beans in the Collection. */ diff --git a/src/main/java/com/avaje/ebean/EbeanServer.java b/src/main/java/com/avaje/ebean/EbeanServer.java index fea19cfef9..89c7c04cfa 100644 --- a/src/main/java/com/avaje/ebean/EbeanServer.java +++ b/src/main/java/com/avaje/ebean/EbeanServer.java @@ -1223,14 +1223,6 @@ public interface EbeanServer { */ void delete(Object bean) throws OptimisticLockException; - /** - * Deprecated - please migrate to deleteAll(). - * - * Delete all the beans in the collection. - */ - @Deprecated - int delete(Collection beans) throws OptimisticLockException; - /** * Delete all the beans in the collection. */ diff --git a/src/main/java/com/avaje/ebeaninternal/server/core/DefaultServer.java b/src/main/java/com/avaje/ebeaninternal/server/core/DefaultServer.java index 8499bfae37..303591dc35 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/core/DefaultServer.java +++ b/src/main/java/com/avaje/ebeaninternal/server/core/DefaultServer.java @@ -1795,14 +1795,6 @@ public void delete(Object bean, Transaction t) { persister.delete(checkEntityBean(bean), t); } - /** - * Delete all the beans in the collection. - */ - @Override - public int delete(Collection beans) { - return deleteAllInternal(beans.iterator(), null); - } - @Override public int delete(Iterator it, Transaction transaction) throws OptimisticLockException { return deleteAllInternal(it, transaction); diff --git a/src/test/java/com/avaje/ebeaninternal/api/TDSpiEbeanServer.java b/src/test/java/com/avaje/ebeaninternal/api/TDSpiEbeanServer.java index d4f7ba0c78..e95c951782 100644 --- a/src/test/java/com/avaje/ebeaninternal/api/TDSpiEbeanServer.java +++ b/src/test/java/com/avaje/ebeaninternal/api/TDSpiEbeanServer.java @@ -488,11 +488,6 @@ public void delete(Object bean) throws OptimisticLockException { } - @Override - public int delete(Collection c) throws OptimisticLockException { - return 0; - } - @Override public int delete(Class beanType, Object id) { return 0; diff --git a/src/test/java/com/avaje/tests/compositekeys/TestOnCascadeDeleteChildrenWithCompositeKeys.java b/src/test/java/com/avaje/tests/compositekeys/TestOnCascadeDeleteChildrenWithCompositeKeys.java index 480c281519..2369865413 100644 --- a/src/test/java/com/avaje/tests/compositekeys/TestOnCascadeDeleteChildrenWithCompositeKeys.java +++ b/src/test/java/com/avaje/tests/compositekeys/TestOnCascadeDeleteChildrenWithCompositeKeys.java @@ -32,7 +32,7 @@ public class TestOnCascadeDeleteChildrenWithCompositeKeys extends BaseTestCase { @Before public void before() { // remove all the User records first - Ebean.delete(Ebean.find(User.class).findList()); + Ebean.deleteAll(Ebean.find(User.class).findList()); // insert 2 User records Ebean.save(new User(1L)); diff --git a/src/test/java/com/avaje/tests/m2m/TestM2MDeleteWithCascade.java b/src/test/java/com/avaje/tests/m2m/TestM2MDeleteWithCascade.java index a901efdf05..dc7c1fa70c 100644 --- a/src/test/java/com/avaje/tests/m2m/TestM2MDeleteWithCascade.java +++ b/src/test/java/com/avaje/tests/m2m/TestM2MDeleteWithCascade.java @@ -44,7 +44,7 @@ public void test() { Assert.assertEquals("roles not deleted", 2, rc); - Ebean.delete(roles); + Ebean.deleteAll(roles); rc = Ebean.find(MRole.class).where().idIn(roleIds).findRowCount();