商品分类代码标准代码

时间:2011-10-14 17:12:07
【文件属性】:

文件名称:商品分类代码标准代码

文件大小:569KB

文件格式:RAR

更新时间:2011-10-14 17:12:07

商品分类代码标准代码

对于三层构建// 查询的方法 public Set selectAll() { // 用HashSet查询 Set li1 = new HashSet(); // 用TreeSet查询 Set li2 = new TreeSet(); // 用LinkedHashSet查询 Set li3 = new LinkedHashSet(); try { String sql = "select t_fl.f_name,t_fl.f_remark,t_sp.s_name,t_sp.s_price,t_sp.f_id from t_fl,t_sp where t_fl.f_id=t_sp.f_id"; stmt = conn.prepareStatement(sql); rs = stmt.executeQuery(); while (rs.next()) { Fl fl = new Fl(); Sp sp = new Sp(); All al = new All(); fl.setF_name(rs.getString("f_name")); fl.setF_remark(rs.getString("f_remark")); sp.setF_id(rs.getInt("f_id")); sp.setS_name(rs.getString("s_name")); sp.setS_price(rs.getDouble("s_price")); al.setFl(fl); al.setSp(sp); li1.addAll(Arrays.asList(al.getFl().getF_name() + " " + al.getFl().getF_remark() + " " + al.getSp().getF_id() + " " + al.getSp().getS_name() + " " + al.getSp().getS_price())); li2.addAll(Arrays.asList(al.getFl().getF_name() + " " + al.getFl().getF_remark() + " " + al.getSp().getF_id() + " " + al.getSp().getS_name() + " " + al.getSp().getS_price())); li3.addAll(Arrays.asList(al.getFl().getF_name() + " " + al.getFl().getF_remark() + " " + al.getSp().getF_id() + " " + al.getSp().getS_name() + " " + al.getSp().getS_price())); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (stmt != null) stmt.close(); if (rs != null) rs.close(); if (conn != null) conn.close(); } catch (Exception ex) { ex.printStackTrace(); } } return li2; }


【文件预览】:
商品分类代码标准代码
----DBConnection()
--------.project(1KB)
--------.mymetadata(309B)
--------WebRoot()
--------.myeclipse()
--------src()
--------.classpath(410B)
----DBSQL()
--------SQLQuery1.sql(430B)

网友评论