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

📄 clienttypedao.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;


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

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

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

⌨️ 快捷键说明

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