⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customerdaoimpl.java

📁 该程序能够准确的记录互联网用户上网所用的流量
💻 JAVA
字号:
package com.briup.customer.dao.impl;import org.apache.commons.lang.StringUtils;import org.hibernate.Query;import org.hibernate.Session;import org.springframework.orm.hibernate3.HibernateTemplate;import com.briup.common.dao.pojo.Product;import com.briup.common.dao.pojo.User;import com.briup.customer.dao.ICustomerDao;public class CustomerDaoImpl extends HibernateTemplate implements ICustomerDao {	//	修改用户信息 	public void updateCustomerInfo(User user) throws Exception {		// TODO Auto-generated method stub		super.saveOrUpdate(user);	}	//	 通过品牌名称查询品牌信息 	public Product getProductInfo(String name) throws Exception {		// TODO Auto-generated method stub		Query query = null;		if(StringUtils.isNotEmpty(name)){			Session session = this.getSession();			query = session.createQuery("from Product where name=?");			query.setString(0, name);		}		return (Product) query.uniqueResult();	}			//	按品牌名称查找品牌		public Product findProductByName(String name) throws Exception {		Query query = null;		Session session = this.getSession();		query = session.createQuery("from Product where name=?");		query.setString(0, name);		return (Product)query.uniqueResult();	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -