cpdaohibernate.java

来自「这个是完整的wap项目的源码 开发语言 Java 系统架构 Struts +」· Java 代码 · 共 38 行

JAVA
38
字号
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 + =
减小字号Ctrl + -
显示快捷键?