首页>代码>Java权限管理系统源代码下载>/chpt9/src/org/appfuse/dao/DAO.java
package org.appfuse.dao;

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

/**
 * Data Access Object (DAO) interface. This is an interface used to tag our DAO
 * classes and to provide common methods to all DAOs.
 *
 * <p>
 * <a href="DAO.java.html"> <i>View Source </i> </a>
 * </p>
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible </a>
 */
public interface DAO {

    /**
     * Generic method used to get all objects of a particular type. This is the
     * same as lookup up all rows in a table.
     *
     * @param clazz
     *            the type of objects (a.k.a. while table) to get data from
     * @return List of populated objects
     */
    public List getObjects(Class clazz);

    /**
     * Generic method to get an object based on class and identifier. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if nothing is
     * found.
     *
     * @param clazz
     *            model class to lookup
     * @param id
     *            the identifier (primary key) of the class
     * @return a populated object
     * @see org.springframework.orm.ObjectRetrievalFailureException
     */
    public Object getObject(Class clazz, Serializable id);

    /**
     * Generic method to save an object - handles both update and insert.
     *
     * @param o
     *            the object to save
     */
    public void saveObject(Object o);

    /**
     * Generic method to delete an object based on class and id
     *
     * @param clazz
     *            model class to lookup
     * @param id
     *            the identifier (primary key) of the class
     */
    public void removeObject(Class clazz, Serializable id);
}
最近下载更多
15766672422  LV2 2023年11月14日
liusha625184071  LV13 2023年8月15日
LW  LV1 2021年7月23日
fangjionghao1  LV2 2021年6月14日
陈若愚  LV4 2021年5月14日
Harden  LV22 2021年5月8日
614627929  LV10 2021年1月2日
zwhbhve  LV1 2020年12月22日
2017005883  LV1 2020年8月24日
骑着蜗牛去救你  LV1 2020年4月16日
最近浏览更多
bananmike77 3月23日
暂无贡献等级
做自己的太阳  LV11 2月1日
ww0408  LV1 2023年12月28日
故里逢春  LV2 2023年12月25日
uuu1234 2023年12月19日
暂无贡献等级
15766672422  LV2 2023年11月14日
大林市三院 2023年10月31日
暂无贡献等级
高腾达  LV3 2023年9月3日
yuexiaolong  LV1 2023年7月4日
明天更美好  LV10 2023年6月17日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友