📄 accountinfodaoimpl.java
字号:
package com.accp.dao.impl;
import java.sql.SQLException;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateCallback;
import com.accp.dao.AccountinfoDao;
import com.accp.entity.Accountinfo;
public class AccountinfoDaoImpl extends BaseDao implements AccountinfoDao {
@Override
public List getAccountinfo(final Accountinfo accountinfo) {
// TODO Auto-generated method stub
List list = null;
list = super.getHibernateTemplate().executeFind(new HibernateCallback() {
@Override
public Object doInHibernate(Session s)
throws HibernateException, SQLException {
// TODO Auto-generated method stub
List list = s.createQuery("from Accountinfo a where a.account = :account and a.psw = :psw")
.setString("account", accountinfo.getAccount())
.setString("psw", accountinfo.getPsw())
.list();
return list;
}});
return list;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -