Strut数据库开发中的JSF项目

源代码在线查看: dao.java

软件大小: 10073 K
上传用户: wp1111111
关键词: Strut JSF 数据库 项目
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.relationinfo.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.
				 *
				 * www.relationinfo.com
				 *
				 * @author caoguangxin www.relationinfo.com
				 */
				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);
				}
							

相关资源