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