@Test public void deleteAll() { H.saveAll(rootsAB()); List<Root> list = createRootRequest().list(); assertThat(list).hasSize(2); H.deleteAll(list); int count = createRootRequest().count(); assertThat(count).isEqualTo(0); }
public static <T> void deleteAll(final Iterable<T> entities) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { for (T entity : entities) { session.delete(entity); } return null; } }); }
HibernateObjectQuery { public static <T> void deleteAll(final Iterable<T> entities) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { for (T entity : entities) { session.delete(entity); } return null; } }); } }
HibernateObjectQuery { public static <T> void deleteAll(final Iterable<T> entities) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { for (T entity : entities) { session.delete(entity); } return null; } }); }  }
HibernateObjectQuery { public static <T> void deleteAll(final Iterable<T> entities) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { for (T entity : entities) { session.delete(entity); } return null; } }); }  static T save(final T entity); static T saveOrUpdate(final T entity); static Iterable<T> saveAll(final Iterable<T> entities); static Iterable<T> saveOrUpdateAll(final Iterable<T> entities); static void delete(final T entity); static void deleteAll(final Iterable<T> entities); }
HibernateObjectQuery { public static <T> void deleteAll(final Iterable<T> entities) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { for (T entity : entities) { session.delete(entity); } return null; } }); }  static T save(final T entity); static T saveOrUpdate(final T entity); static Iterable<T> saveAll(final Iterable<T> entities); static Iterable<T> saveOrUpdateAll(final Iterable<T> entities); static void delete(final T entity); static void deleteAll(final Iterable<T> entities);  }