Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SpecVisual[] getBocetosEdicion(int edicion) {
- SpecVisual Svisual = new SpecVisual();
- ArrayList<SpecVisual> arrbocetos = new ArrayList<SpecVisual>();
- String driver = "org.postgresql.Driver";
- String connectString = "jdbc:postgresql://db1.medellin.intrayell.com:5432/clipper";
- String user = "clipper";
- String password = "clipper";
- try {
- Class.forName(driver);
- Connection con = DriverManager.getConnection(connectString, user,
- password);
- Statement stmt = con.createStatement();
- ResultSet rs = stmt
- .executeQuery("Select * from Spec_visual where book_edition='"
- + edicion + "' limit 5;");
- while (rs.next()) {
- Svisual.setClipperWiRef(rs.getString(1));
- Svisual.setCurrentStatus(rs.getString(2));
- // Svisual.setCurrentStatusDate(rs.getString(3));
- Svisual.setClipperAdvertiserRef(rs.getString(4));
- // Svisual.setBookEdition(rs.getString(5));
- // Svisual.setDueDate(rs.getString(6));
- // Svisual.setAdFix(rs.getString(7));
- // Svisual.setTimestamp(rs.getString(8));
- // Svisual.setReaderFwrReasonCode(rs.getString(9));
- // Svisual.setRefGraphicId(rs.getString(10));
- // Svisual.setAdvertGraphicId(rs.getString(11));
- arrbocetos.add(Svisual);
- }
- stmt.close();
- con.close();
- } catch (Exception e) {
- System.out.println(e.getMessage());
- }
- return arrbocetos.toArray(new SpecVisual[arrbocetos.size()]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement