#326 - API Addition - saveAll(), deleteAll() etc

This commit is contained in:
Robin Bygrave
2015-07-20 09:51:36 +12:00
parent fb1c29b57c
commit 920635c6df
+9
View File
@@ -671,6 +671,7 @@ public final class Ebean {
*
* Save all the beans from a Collection.
*/
@Deprecated
public static int save(Collection<?> beans) throws OptimisticLockException {
return serverMgr.getDefaultServer().saveAll(beans);
}
@@ -762,9 +763,17 @@ public final class Ebean {
serverMgr.getDefaultServer().deleteAll(beanType, ids);
}
/**
* Delete several beans given their type and id values.
*/
public static void deleteAll(Class<?> beanType, Collection<?> ids) {
serverMgr.getDefaultServer().deleteAll(beanType, ids);
}
/**
* Delete all the beans from an Iterator.
*/
@Deprecated
public static int delete(Iterator<?> it) throws OptimisticLockException {
return serverMgr.getDefaultServer().delete(it);
}