package com.xxx.dao;

import java.io.Serializable;
import java.util.List;

/**
 * 所有dao层都要实现的通用接口
 * 
 * @author admin
 * 
 * @param <T>
 */
public interface IBaseDao<T extends Serializable> {
	/**
	 * 查找一个实体类对象
	 * 
	 * @param id
	 *            对象id
	 * @return
	 */
	T findOne(final long id) throws Exception;

	/**
	 * 查找所有的实体类对象
	 * 
	 * @return
	 */
	List<T> findAll() throws Exception;

	/**
	 * 添加一个实体类对象
	 * 
	 * @param entity
	 */
	void addOne(final T entity) throws Exception;

	/**
	 * 更新一个实体类对象
	 * 
	 * @param entity
	 */
	void update(final T entity) throws Exception;

	/**
	 * 删除一个实体类对象
	 * 
	 * @param entityId
	 */
	void deleteById(final long entityId) throws Exception;
}
最近下载更多
kpirateshe  LV1 2021年5月26日
912299793  LV21 2020年5月15日
Rrdiscover  LV4 2019年6月18日
随遇而安  LV6 2018年10月2日
279217639  LV1 2018年9月8日
petter007  LV10 2018年4月1日
test12312321  LV14 2018年2月1日
越努力越幸运的小宝  LV3 2017年3月15日
cccccccccccc  LV13 2016年9月3日
tiger081  LV11 2016年8月10日
最近浏览更多
星辰xc  LV2 2023年5月8日
kpirateshe  LV1 2021年5月26日
黑客即将来临 2021年1月26日
暂无贡献等级
MARTIN66666  LV1 2020年12月26日
dongzhan  LV12 2020年12月22日
wangtengfei 2020年6月25日
暂无贡献等级
fpxrng  LV9 2020年6月22日
jimmyke  LV2 2020年6月16日
hongren 2020年6月13日
暂无贡献等级
endual  LV11 2020年6月9日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友