public void deleteByHql(String hql) {
SessionFactory sessionFactory = new Configuration().configure()
.buildSessionFactory();
Session session = sessionFactory.openSession();
Query query = session.createQuery(hql);
String hql = "delete from TbProfiles where name ='" + profiles.getName()+"'";
query.setString(arg0, arg1)//应该用哪个
query.setInteger(arg0, arg1);//应该用哪个
session.beginTransaction().commit(); }RT。帮我写下