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

📄 cpdaohibernate.java

📁 这个是完整的wap项目的源码 开发语言 Java 系统架构 Struts + hibernate + spring 数据库 Mysql5.0 应用服务器Tomcat5.0 开发工具 MyEc
💻 JAVA
字号:
package com.longtime.wap.module.business.dao.hibernate;

import java.util.List;

import com.longtime.wap.common.BaseDao;
import com.longtime.wap.model.Cp;
import com.longtime.wap.module.business.dao.CpDao;

/**
 * CpDao层代码实现类
 * 
 * @author gengb
 * @date Nov 15, 2007
 */
public class CpDaoHibernate extends BaseDao implements CpDao {
	
	/**
	 * 获取cp列表
	 * 
	 * @return cp对象列表
	 */
	public List retrieveCps() {
		return this.getHibernateTemplate().find("from Cp order by cpId asc");
	}

	/**
	 * 根据cp的Id获取cp对象
	 * 
	 * @param id
	 *            cp编号
	 * @return cp对象
	 */
	public Cp retrieveCpByCpId(Long id) {
		return (Cp) this.getHibernateTemplate().get(Cp.class, id);
	}

}

⌨️ 快捷键说明

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