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

📄 productiontypedao.java

📁 客户关系管理系统主要管理新老客户的一些信息并可以发现潜在客户
💻 JAVA
字号:
/**
 * 
 */
package com.qrsx.qrsxcrm.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;

import com.qrsx.qrsxcrm.model.ClientType;
import com.qrsx.qrsxcrm.model.ProductionType;
import com.qrsx.qrsxcrm.model.ServiceType;

/**
 * @author Administrator
 *
 */
public class ProductionTypeDAO extends BaseDAO
{

	@SuppressWarnings("unchecked")
	public ProductionTypeDAO(Class ProductionType) {
		super(ProductionType);
		// TODO Auto-generated constructor stub
	}
	
	public void updates(ProductionType productionType)
	{
		ProductionType productionType1 = new ProductionType();
		productionType1=(ProductionType) session.get(ProductionType.class, productionType.getId());
		productionType1.setName(productionType.getName());
		session.update(productionType1);
	}

	@SuppressWarnings("unchecked")
	public List<ProductionType> lists(ProductionType productionType){
		List<ProductionType> list=new ArrayList<ProductionType>();
		String sql="from ProductionType t where 1=1 ";
		if(productionType.getName()!=null&&productionType.getName().trim()!=""){
			sql+=" and t.name like '%"+productionType.getName().trim()+"%' ";
		}
		Query query=session.createQuery(sql);
		list=query.list();
		return list;
	}
}

⌨️ 快捷键说明

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