?? categorybo.java
字號:
package test.bo;
import java.util.*;
import java.sql.*;
import test.models.*;
import test.db.*;
public class CategoryBO {
Category category;
public CategoryBO() {
}
public Collection allCategory() throws Exception {
Collection ret = new ArrayList();
try {
DBAccess dba = new DBAccess();
String sql = "select * from category";
ResultSet rs = dba.openSelect(sql);
while (rs.next()) {
Category category = new Category();
category.setCatid(rs.getString("catid"));
category.setName(rs.getString("name"));
category.setDescn(rs.getString("descn"));
ret.add(category);
}
}
catch (Exception e) {
e.printStackTrace();
}
return ret;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -