Changeset 70 for ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/ProduitDAOjdbc.java
- Timestamp:
- 04/26/10 19:12:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/ProduitDAOjdbc.java
r68 r70 10 10 11 11 import org.medias.eccad.helpers.CharactereHelper; 12 import org.medias.eccad.helpers.LoggerPerso;13 12 import org.medias.eccad.modele.Produit; 14 13 import org.medias.eccad.persistance.jdbc.SGBD_jdbc; … … 34 33 try { 35 34 requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 36 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join grille using (id_produit) where id_param = " + id_param + ";"; 37 35 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit, order_produit from produit join grille using (id_produit) where id_param = " + id_param + " order by order_produit;"; 38 36 ResultSet resultat = requete.executeQuery(sql); 39 37 … … 55 53 } 56 54 57 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProduit::taille::"+liste_param.size()+"\nSQL::" + sql);58 55 return liste_param; 59 56 } … … 89 86 try { 90 87 requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 91 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit, temporalRes_produit, name_typeproduit from produit join typeproduit using (id_typeproduit) where id_produit = " + id_produit + ";"; 88 sql = "select distinct id_produit, title_produit, begintime_produit" + 89 ", endtime_produit, header_produit, temporalRes_produit, name_typeproduit" + 90 ", textcitation_produit, useconst_produit, informpub_produit" + 91 " from produit join typeproduit using (id_typeproduit)" + 92 " where id_produit = " + id_produit + ";"; 92 93 93 94 ResultSet resultat = requete.executeQuery(sql); … … 101 102 produit.setTemporalres(CharactereHelper.getEncodage(resultat.getString("temporalRes_produit"), "ISO-8859-1")); 102 103 produit.setType(CharactereHelper.getEncodage(resultat.getString("name_typeproduit"), "ISO-8859-1")); 104 produit.setCitation(CharactereHelper.getEncodage(resultat.getString("textcitation_produit"), "ISO-8859-1")); 105 produit.setUseconst(CharactereHelper.getEncodage(resultat.getString("useconst_produit"), "ISO-8859-1")); 106 produit.setInformpub(CharactereHelper.getEncodage(resultat.getString("informpub_produit"), "ISO-8859-1")); 103 107 } 104 108 } … … 109 113 closeConnection(); 110 114 } 111 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate());115 // LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 112 116 113 117 return produit; … … 122 126 try { 123 127 requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 124 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join lienproduit using (id_produit) 128 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join lienproduit using (id_produit)"; 125 129 126 130 if (id_produit != null) { … … 149 153 } 150 154 151 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProductByLink::taille::"+liste_produit.size());155 // LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProductByLink::taille::"+liste_produit.size()); 152 156 return liste_produit; 153 157 }
Note: See TracChangeset
for help on using the changeset viewer.