S2SH关键字查询功能
关键字相等的函数是自动生成的:
public List findByProperty(String propertyName, Object value) {
log.debug("finding Courseware instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from Courseware as model where model."
+ propertyName + "= ?";
return getHibernateTemplate().find(queryString, value);
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
现在我想把他改为关键字模糊查询,就是包含关键字的都查询到,请问应该怎么改?