public void remove(int id){
java.sql.Connection conn=null;
java.sql.Statement stm=null;
try {
conn=this.getHibernateTemplate().getSessionFactory().openSession().connection();
stm = conn.createStatement();
String sql = "delete from × where id="+id;
stm.execute(sql);
}
catch (Exception e) {
e.printStackTrace();
}finally{
try {
if(null != stm){
stm.close();
}
if(null != conn){
conn.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}