public void delete(String ids) {
   if (ids != null) {
     for (String id : ids.split(",")) {
       Tuser u = userDao.get(Tuser.class, id.trim());
       if (u != null) {
         userroleDao.executeHql("delete Tusertrole t where t.tuser = ?", new Object[] {u});
         userDao.delete(u);
       }
     }
   }
 }
 private void del(String cid) {
   Tauth t = authDao.get(Tauth.class, cid);
   if (t != null) {
     roleauthDao.executeHql("delete Troletauth t where t.tauth = ?", new Object[] {t});
     Set<Tauth> auths = t.getTauths();
     if (auths != null && !auths.isEmpty()) {
       // there exists child auth under current auth
       for (Tauth tauth : auths) {
         del(tauth.getCid());
       }
     }
     authDao.delete(t);
   }
 }