日期:2014-05-20 浏览次数:20793 次
public int findByName(String name){
try{
session = HibernateUtils.getSession();
tx = session.beginTransaction();
String sql = " from Books where name like '?%'";
Query query = session.createQuery(sql);
query.setParameter(0, name);