HibernateObjectQuery { public static <T> void delete(final T entity) { HibernateSessionFactory.doInTransaction(new IRequest<Void>() { @Override public Void doInTransaction(Session session) { 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);  }
@Test public void delete() { H.saveOrUpdate(rootA()); Root root = createRequestForRootA().first(); assertThat(root).isNotNull(); H.delete(root); int count = createRequestForRootA().count(); assertThat(count).isEqualTo(0); }