📄 20e220dd5d3b001d12f483999dc4cf57
字号:
package com.daoImpl;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.*;
import com.dao.RelationDAO;
import com.jdbc.DataBaseConnection;
import com.sun.xml.internal.bind.v2.schemagen.xmlschema.List;
import com.vo.ChezhanVO;
import com.vo.RelationVO;
public class RelationDAOImpl implements RelationDAO {
public Collection getRelationVO(int chezhanNumber) {
Collection all =new ArrayList() ;
DataBaseConnection dbc = null;
PreparedStatement psmt = null;
ResultSet rs = null;
String sql = "select cinumber from relation where cznumber=?";
try {
psmt = dbc.getConnection().prepareStatement(sql);
psmt.setInt(1, chezhanNumber);
rs = psmt.executeQuery();
while (rs.next()) {
/*RelationVO vo = null;
vo.setCheciNumber(rs.getString(1));
vo.setChezhanNumber(rs.getInt(2));
vo.setNumber(rs.getInt(3));
vo.setLength(rs.getInt(4));
all.add(vo);*/
}
} catch (Exception e) {
} finally {
dbc.close();
}
return all;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -