示例#1
0
  // 删除消息
  public void deleteMessage(List<Message> message) {

    try {
      hibernateTemplate.deleteAll(message);
    } catch (Exception e) {
      System.out.println(e + "-----");
    }
  }
 @Transactional(readOnly = false)
 public void clearStats() {
   hibernateTemplate.deleteAll(hibernateTemplate.loadAll(Stat.class));
 }
示例#3
0
 protected void delete(Class type) {
   HibernateTemplate t = getHibernateTemplate();
   t.deleteAll(t.find("from " + type.getName()));
 }
示例#4
0
 @Override
 public int removeAll() throws InstanceNotFoundException {
   List<E> rows = getEntities();
   ht.deleteAll(rows);
   return rows.size();
 }