setBoolean(int position,boolean val)
引數說明:String hql = "from UserForm where isDel=?"; //定義HQL語句 Query query = session.createQuery(hql); //執行HQL語句獲取Query物件 query.setBoolean(0,true); //係結HQL語句引數
setBoolean(String name,boolean val)
引數說明:String hql = "from UserForm where isDel=:isDel"; //定義查詢HQL語句 Query query = session.createQuery(hql); //執行HQL語句獲取Query物件 query.setBoolean("isDel",true); //設定HQL語句引數