this.getHibernateTemplate().find()怎么用
find()里放的到底是数组对象还是hql语句?犯晕了~~还有我想通过struts调用dao的查询结果,再在jsp页面遍历显示,如何实现?顺便帮忙看下代码,谢谢:publ...
find()里放的到底是数组对象还是hql语句?犯晕了~~
还有我想通过struts调用dao的查询结果,再在jsp页面遍历显示,如何实现?
顺便帮忙看下代码,谢谢:
public class LibraryReaderBll extends HibernateDaoSupport {
public List Find()
{
return this.getHibernateTemplate().find("from LibraryReader");
//System.out.println("tmpl.save(admin);");
}
public class LibraryReaderAction extends ActionSupport{
public LibraryReaderBll LibraryReaderBll;
public void setLibraryReaderBll(LibraryReaderBll libraryReaderBll) {
LibraryReaderBll = libraryReaderBll;
}
@Override
public String execute()
{System.out.println("sdfs1");
LibraryReaderBll.Find();
System.out.println("sdfs1");
return "success";
}
}
分别是dao里的和action里的 展开
还有我想通过struts调用dao的查询结果,再在jsp页面遍历显示,如何实现?
顺便帮忙看下代码,谢谢:
public class LibraryReaderBll extends HibernateDaoSupport {
public List Find()
{
return this.getHibernateTemplate().find("from LibraryReader");
//System.out.println("tmpl.save(admin);");
}
public class LibraryReaderAction extends ActionSupport{
public LibraryReaderBll LibraryReaderBll;
public void setLibraryReaderBll(LibraryReaderBll libraryReaderBll) {
LibraryReaderBll = libraryReaderBll;
}
@Override
public String execute()
{System.out.println("sdfs1");
LibraryReaderBll.Find();
System.out.println("sdfs1");
return "success";
}
}
分别是dao里的和action里的 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询