delete(Object entity)
public void delBoyUser(TbUser user){ HibernateTemplate htm = getHibernateTemplate(); if(user.getAge()<20){ //判斷從資料庫查詢到的年齡是否小於20 htm.delete(user); } }