java新手问题,这段小代码是什么意思,起什么作用,希望说详细些,谢谢
public List getListBySQL(final String queryString) {
try {
List list = getHibernateTemplate().executeFind(new HibernateCallback() {
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
SQLQuery query = session.createSQLQuery(queryString);
List list = query.list();
try {
releaseSession(session);
} finally {
return list;
}
}
});
return list;
} catch (RuntimeException re) {
throw re;
}
}
qq_30000497
2015/07/21 06:43- java
- 点赞
- 收藏
- 回答