Пример #1
0
 @Override
 public int deleteAllWithoutCascade(Class<?> clazz) {
   return getSession().createQuery("delete from " + clazz.getName()).executeUpdate();
 }
Пример #2
0
 @Override
 public boolean exists(Class<?> clazz) {
   return findFirstByHql(clazz, "from " + clazz.getName()) != null;
 }