dao.java

来自「本文论述了一个前台笔记本销售系统的开发过程」· Java 代码 · 共 45 行

JAVA
45
字号
package com.set.appframe.persistence;

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.
 */
public interface DAO {

	/**
	 * Generic method to get an object - id must be populated
	 * 
	 * @param o
	 * @return a populated object (or null if id doesn't exist)
	 * @throws DAOException
	 */
	public Object getObject(String id, Class objClass) throws DAOException;

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

	/**
	 * Generic method to delete an object
	 * 
	 * @param o
	 *            the object to delete
	 * @throws DAOException
	 */
	public void removeObject(String id, Class objClass) throws DAOException;

	/**
	 * @author lc get Object List
	 * @param listHQL
	 * @return
	 * @throws DAOException
	 */
	public List getObjectList(String listHQL) throws DAOException;
}

⌨️ 快捷键说明

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