package cn.edu.qust.news.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import cn.edu.qust.news.dao.TypeDao; import cn.edu.qust.news.domain.Type; import cn.edu.qust.news.utils.JdbcUtil; public class TypeDao { public TypeDao() { // TODO Auto-generated constructor stub } public List<Type> findType() { Connection conn=null; PreparedStatement stmt = null; ResultSet rs = null; List<Type> lTypes=new ArrayList<Type>(); try { conn = JdbcUtil.getConnection(); stmt = conn .prepareStatement("select f_typename from t_type order by f_typeid DESC"); rs = stmt.executeQuery(); while (rs.next()) { Type type=new Type(); type.setTypeName(rs.getString("f_typename")); lTypes.add(type); } return lTypes; } catch (Exception e) { throw new RuntimeException(e); } finally { JdbcUtil.release(rs, stmt, conn); } } }
最近下载更多
asddwh LV12
2023年12月29日
19542347615 LV1
2023年11月23日
无名氏111 LV32
2023年11月18日
lwlwlwlw LV3
2023年6月17日
傻瓜还没打死烦人 LV7
2022年12月6日
zhunishimian LV6
2022年10月30日
SQ2930501923 LV14
2022年10月16日
CHENHAOJUDA LV10
2022年6月15日
小丶无奈 LV10
2022年6月13日
dasdascccf LV10
2022年6月10日
最近浏览更多
wjh007 LV4
2月29日
GerryGim LV4
1月15日
Liang朝伟 LV1
1月5日
1345fwwhjb
1月4日
暂无贡献等级
13161895 LV1
2023年12月30日
hxy19991216 LV4
2023年12月29日
asddwh LV12
2023年12月26日
yuanshun LV6
2023年12月19日
洪徽宏
2023年12月15日
暂无贡献等级
Gujiangtao
2023年12月9日
暂无贡献等级