public ArrayList select(String sql) throws Exception{Session session = HibernateSessionFactory.currentSession();Connection con = session.connection();PreparedStatement pstmt = con.preparedStatement(sql);ResultSet rs = pstmt.executeQuery();ResultSetMetaData rsmd = rs.getMetaData();Hashtable ht = null;ArrayList array = new ArrayList();while(rs.next()){ht = new Hashtable();for(int i=0;i
这就是微学网-程序员之家为你提供的"Hibernate通用数据库操作代码"希望对你有所帮助.本文来自网络,转载请注明出处:http://www.weixuecn.cn/article/5261.html