我自己实现了一个数据访问层
源代码在线查看: entitycollection.java
package dark.db.entity;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
/**
* Title:
* Description:
* Copyright: Copyright (c) 2003
* Company: DIS
* Create Time: 2004-3-21 21:19:30
* @author darkhe
* @version 1.0
*/
public interface EntityCollection
{
/**
* 将记录集包裹成实体集
* @return
* @throws SQLException
*/
public List getList(ResultSet rs) throws SQLException;
/**
* 根据查询条件返回实体集
* @param sql
* @return
* @throws SQLException
*/
public List getList(String sql) throws SQLException;
}