标签:ons criteria 分享 条件查询 img too 查询 lis strong
Criteria(条件查询接口)
// 1.简单查询 List<Customer> list = session.createCriteria(Customer.class).list(); // 2.条件查询: Criteria criteria = session.createCriteria(Customer.class); criteria.add(Restrictions.eq("name","芙蓉")); List<Customer> list = criteria.list(); // 3.分页查询: Criteria criteria = session.createCriteria(Customer.class); criteria.setFirstResult(3); criteria.setMaxResults(3); List<Customer> list = criteria.list();
标签:ons criteria 分享 条件查询 img too 查询 lis strong
原文地址:http://www.cnblogs.com/coderdxj/p/6917558.html