SimpleHibernateDao.java类

  2012-1-10

  1.增加了1个and条件的EQS判断

/**
* 按属性查找对象列表, 同时满足pro1和pro2的条件.
*/
public List<T> findByPor1_Pro2(final String propertyName1,
final Object value1,final String propertyName2, final Object value2) {
Assert.hasText(propertyName1, "propertyName1不能为空");
Assert.hasText(propertyName2, "propertyName2不能为空");
Criterion criterion1 = Restrictions.eq(propertyName1, value1);
Criterion criterion2 = Restrictions.eq(propertyName2, value2);
return find(criterion1,criterion2);
}

 

 

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-04-30
  • 2021-04-01
猜你喜欢
  • 2021-11-23
  • 2021-04-22
  • 2022-01-23
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案