?? categoryimpl.java
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.ebook.impl;import com.ebook.dao.*;import java.util.*;import java.sql.*;import com.ebook.Entity.*;/** * * @author 隆科 */public class CategoryImpl implements CategoryDao { Connection con; public CategoryImpl(Connection con) { this.con = con; } public ArrayList getCategory() throws Exception { ArrayList list = new ArrayList(); PreparedStatement pstm; String sql = "select* from category"; pstm = con.prepareStatement(sql); ResultSet rs = pstm.executeQuery(); while(rs.next()) { Category c= new Category(); c.setCateid(rs.getInt("Cateid")); c.setCatename(rs.getString("Catename")); list.add(c); } return list; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -