![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Hibernate
玄星子
这个作者很懒,什么都没留下…
展开
-
PreparedStatement like 预编译
Connection conn = getConnection();PreparedStatement ps = conn.prepareStatement("select * from student t where t.name like ?");ps.setString(1, "%张%");ResultSet rs = ps.executeQuery();while (rs.next原创 2013-10-18 09:58:27 · 1377 阅读 · 0 评论 -
hibernate实体字段查出组装map
hibernate实体字段查出组装mapString hql="select new map(t.id as ID,t.name as NAME,t.status as STATUS)" +"from Personal t where t.name='names' and t.status='1' ";List list = this.queryManager.find(hql);原创 2013-04-09 09:58:30 · 624 阅读 · 0 评论 -
hibernate查询表的几个字段遍历数据
hibernate查询表的几个字段遍历数据//查询其中的几个字段String hql = " select name,passwd,logintime from Users"; List list = getByHql(hql);for(int i=0;i<list.size();i++){ Object[] obj = (Object[])list.get(i); System.原创 2012-12-25 12:23:46 · 1259 阅读 · 0 评论